package com.nulldev.util.net.irc.numeric;

import com.nulldev.util.net.irc.Channel;
import com.nulldev.util.net.irc.Connection;
import com.nulldev.util.net.irc.Server;

public class EndOfNamesList implements Connection.NumericHandler {
	public boolean applies(Connection connection, int numeric) {
		return numeric == 366;
	}

	public void process(Connection connection, String line, String[] parts) {
		Server srv = connection.getServer();
		Channel channel = srv.getChannel(parts[3]);

		connection.getCallback().onNickList(connection, channel, channel.getUsers());
	}
}
